
export interface InitialState {
    token: string,

}
interface Action {
    type: string,
    payload: any
}

var initialState = {
    token: '',

}
export function reducer(state: InitialState = initialState, action: Action) {
    var newState = JSON.parse(JSON.stringify(state))

    if (action.type == 'SAVE_LOGININFO') {
        newState.token = action.payload
        return newState
    }
    else {
        return state
    }

}